package com.cs.dingdingauto.bgs;

import android.app.PendingIntent;
import android.content.Context;
import android.content.Intent;
import android.os.Build;

public class PendingIntentUtils {

    public static PendingIntent getBroadcast(Context context, int requestCode, Intent intent, int flags) {
        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S) {
            return PendingIntent
                    .getBroadcast(context, requestCode, intent, PendingIntent.FLAG_MUTABLE | flags);
        } else {
            return PendingIntent.getBroadcast(context, requestCode, intent, flags);
        }
    }
}
